package com.zx.baofu.alcohol.util;

public class PageUtil {

    public static int caclTotalPage(int pageSize, int totalNum){
        int totalPage = (totalNum + pageSize - 1) / pageSize;
        return totalPage;
    }

    public static int caclStart(int pageNum, int pageSize){
        int start = pageSize * (pageNum -1);
        start = start < 0 ? 0 : start;
        return start;
    }
}
